package com.example.demo.controller;


import com.example.demo.Service.TestService;
import com.example.demo.util.ValueTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloWorld {

    @Value("${test.one}")
    private   String test1;

    @Value("${test2.two}")
    private  String test2;

    @Value("test3")
    private  String test3;




    @RequestMapping("hello")
    @ResponseBody
    public String  hello(){
//        String test1 = ValueTest.test1;
//        String test2 = ValueTest.test2;
//        String test3 = ValueTest.test3;
        String tes = ValueTest.test1 +"/"+ ValueTest.test2 +"/"+ ValueTest.test3;
        String test = test1 +"/"+ test2 +"/"+ test3;
        String nishizhu = new TestService().nishizhu();
        return  test+"----------------------"+tes+"-----------------"+nishizhu;
    }

}
